package com.systemic.mapper;

import com.systemic.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ClassName: UserMapper
 * @Description:
 * @Author:
 * @CreateTime: 2023-12-26 20:09
 * @Version:
 **/

@Mapper
public interface UserMapper {


    /**
     * 新增用户
     * @param user
     */
    void insert(User user);

    /**
     * 查询用户
     * @param user
     * @return
     */
    List<User> selectList(User user);

    /**
     * 根据账号查询用户
     * @param account
     * @return
     */
    User findByAccount(@Param("account") String account);

    /**
     * 根据账号和密码查询用户
     * @param account
     * @param password
     * @return
     */
    User findByAccountAndPassword(@Param("account") String account, @Param("password") String password);

    /**
     * 根据uid查询
     * @param uid
     * @return
     */
    User findById(@Param("uid") Integer uid);
}
